<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">资质信息详情</h1>
</div>
<div class="wrapper-sm" >
    <uib-tabset active="2" class="tab-container" ng-init="steps={percent:35, step1:false, step2:true, step3:false, step4:false, step5:false, step6:false}">
        <uib-tab heading="基本信息" select="steps.percent=35" ui-sref="app.car.carManagent_edit"></uib-tab>
        <uib-tab heading="资质信息" index="2" disabled="step1.$invalid" select="steps.percent=55" ui-sref="app.car.carAttachmentEdit">
            <form name="step2" class="form-validation form-horizontal" novalidate ng-controller="carAttachmentEditController">
                <uib-progressbar value="steps.percent" class="progress-xs" type="success"></uib-progressbar>
                <div class="wrapper-sm ">
                    <div class="panel panel-default">
                        <div class="panel-heading font-bold">上传证件照片</div>
                        <div class="panel-body" id="uploading">
                                <ng-form id="AttachmentForm" name="AttachmentForm" class="form-validation form-horizontal">
                                    <div class="panel-body">
                                      
                                       
                                        
                                        <div ng-repeat="attach in attachList">
                                            <div class="col-md-8" >
                                                <label class="pull-left m-l m-r">{{attach.title}}</label>
                                                <div class="col-md-3 form-group">
                                                    <input id="uploadFile_{{attach.uploaderName}}" name="{{attach.uploaderName}}" type="file" file-read uploader="attach.uploader" ng-hide="attach.uploader.queue.length" />
                                                </div>
                                            </div>
                                            <div class="wrapper-sm"  ng-if="attach.uploader.queue.length">
                                                <div class="line  pull-in"></div>
                                                <div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
                                                    <span class="">上传文件数: <b class="badge bg-info">{{ attach.uploader.queue.length }}</b></span>
                                                </div>
                                                <table class="table bg-white-only b-a">
                                                    <thead>
                                                        <tr>
                                                            <th width="50%">名称</th>
                                                            <th >大小</th>
                                                            <th >进度</th>
                                                            <th>状态</th>
                                                            <th>操作</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr ng-repeat="item4 in attach.uploader.queue">
                                                            <td>
                                                                <strong>{{ item4fileName }}</strong>
                                                                <div ng-show="item4._file" style="width:300px"  ng-thumb="{ file: item4._file, width: 400}"></div>
                                                                <div ng-show="!item4._file">
                                                                    <img data-ng-src="{{item4.imgSrc}}" style="width:300px" ng-click="handleImgClick(item4)" data-toggle="modal" data-target="#imgRotate">
                                                                </div>
                                                                
                                                                
                                                            </td>
                                                            <td  nowrap>{{ item4.fileSize/1024/1024|number:2 }} MB</td>
                                                            <td >
                                                                <div class="progress" style="margin-bottom: 0;">
                                                                    <div class="progress-bar" role="progressbar" ng-style="{ 'width': item4.progress + '%' }"></div>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <span ng-show="item4.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                                                <span ng-show="item4.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                                                <span ng-show="item4.isError"><i class="glyphicon glyphicon-remove"></i>失败</span>
                                                            </td>
                                                            <td nowrap>
                                                                <button id="{{attach.uploaderName}}_upload" type="button"  ng-hide="item4.imgSrc" class="btn btn-success btn-xs" ng-click="attach.uploader.upload(item4)" >
                                                                    <span class="glyphicon glyphicon-upload"></span> 上传
                                                                </button>
                                                                <button id="{{attach.uploaderName}}_delete" type="button" ng-hide="!item4._file"   class="btn btn-danger btn-xs" ng-click="attach.uploader.onDelete(item4)" >
                                                                    <span class="glyphicon glyphicon-trash"></span> 删除
                                                                </button>
                                                                <button id="{{attach.uploaderName}}_download" type="button" ng-hide="!item4.imgSrc"  class="btn btn-primary btn-xs" ng-click="attach.uploader.onDownload(item4)" ng-disabled="">
                                                                    <span class="fa fa-cloud-download"></span> 下载
                                                                </button>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </ng-form>
                                <button style="float:right" ng-click="save()" class="btn btn-success">保存</button>
                        </div>
                    </div>
                </div>
                <tms-img-rotate src="selectedImgSrc"></tms-img-rotate>
            </form>
        </uib-tab>
        <uib-tab heading="账户信息" disabled="step2.$invalid" select="steps.percent=75" ui-sref="app.car.carBankCardManagent"></uib-tab>
        <uib-tab heading="主营线路" disabled="step3.$invalid" select="steps.percent=100" ui-sref="app.car.carRouteManagent"></uib-tab>
        <uib-tab heading="交易记录" disabled="step4.$invalid" select="steps.percent=80" ui-sref="app.car.carTradingRecord"></uib-tab>
        <uib-tab heading="诚信记录" disabled="step5.$invalid" select="steps.percent=100" ui-sref="app.car.carEvaluateManagent"></uib-tab>
    </uib-tabset>
</div>